//
//  NetCheckUtil.m
//  Rong360
//
//  Created by tianliwei on 20/3/14.
//  Copyright (c) 2014 tianliwei. All rights reserved.
//

#import "NetCheckUtil.h"
#import "Reachability.h"

@implementation NetCheckUtil

+ (BOOL)isNetworkRunning;
{
    Reachability *r = [Reachability reachabilityWithHostname:@"www.baidu.com"];
    switch ([r currentReachabilityStatus]) {
        case NotReachable:
            return FALSE;
            break;
        case ReachableViaWWAN:
            return TRUE;
            break;
        case ReachableViaWiFi:
            return TRUE;
            break;
    }
    return FALSE;
}
@end
